#!/bin/bash

case $1 in
    (clean)
        rm parser/[pP]arse* calc
    ;;
    (calc)
        cd parser
        bisonc++ -V -l grammar

        cd ..
        g++ -Wall -o calc *.cc */*.cc
    ;;
    (*)
        echo "$0 [clean|calc] to clean or build the calc program"
    ;;
esac
